home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / math / gle-3.000 / gle-3 / gle / manip.hlp < prev    next >
Text File  |  1995-02-07  |  12KB  |  384 lines

  1.  
  2. 3 MANIP
  3.     Manip is a data manipulation package.  It reads in a text
  4.     file of numbers and displays them like a spreadsheet.
  5.     You can then do simple operations on the columns and write
  6.     them out in any format you like.
  7.     Further help is available on the following toppics via
  8.     the HELP command e.g. "HELP COPY"
  9.  
  10.           @mycmds
  11.           Arrows
  12.           BLANK
  13.           CLEAR
  14.           CLOSE
  15.           COPY <range> <range> IF <exp>
  16.           DATA <range>
  17.           DELETE <range> IF <exp>
  18.           EXIT file_name <range> -TAB -SPACE -COMMA
  19.           FIT c3
  20.           Functions
  21.           GENERATE <pattern> <destination>
  22.           GOTO x y
  23.           INSERT <Cn> or <Rn>
  24.           LOAD filename <range> -0
  25.           LOAD filename <range>
  26.           LOGGING mycmds.man
  27.           MOVE <range> <range> IF <exp>
  28.           NEW
  29.           PARSUM <range1> <range2>
  30.           PROP <range> <range>
  31.           QUIT
  32.           Range (discussion on how to specify ranges)
  33.           Recover (recovering from power failure or crash)
  34.           SAVE file_name <range> -TAB -SPACE -COMMA
  35.           SET SIZE ncols nrows
  36.           SET BETWEEN " "
  37.           SET COLTYPE 
  38.           SET COLWIDTH
  39.           SET NCOL n
  40.           SET DPOINTS n
  41.           SET DIGITS n
  42.           SET WIDTH n
  43.           SHELL
  44.           SORT <range> on <exp>
  45.           SUM <range>
  46.           SWAP CnCn | RnRn
  47.           Usage (command line usage)
  48.  
  49. 3 USAGE
  50.     MANIP infile.dat -recover -step -commands c.log -single -size x y
  51.  
  52.     -recover    Reads keys from the file MANIP_.J1 as if they were
  53.         typed by the user.  This will restore you to the
  54.         point just before your pc crashed.
  55.         The last three journal files are stored (.j1 .j2 .j3)
  56.         simply copy the one you want to (.j1) to use it.
  57.  
  58.     -step    Used with recover,  press a space for each key you
  59.         want to read from the journal file,  press any other
  60.         key to stop reading the journal.
  61.  
  62.     -commands filename.man
  63.         This reads the commands in filename.man as if they
  64.         were typed at the keyboard.
  65.  
  66.     -single    This makes MANIP use single precision arithmetic
  67.         and doesn't store strings at all, this enables
  68.         three times as much data in the same amount of memory
  69.  
  70.     -size x y    Sets the initial size of the spreadsheet.  Use this
  71.         with large datasets as it prevents the heap from
  72.         becoming fragmented and thus lets you use much
  73.         larger datasets.
  74.  
  75. 3 RECOVER
  76.     Manip logs everything you type to a file called MANIP_.J1
  77.     When you use the -RECOVER option on the manip command it then
  78.     reads keys from that file as if they were typed at the keyboard.
  79.  
  80.     -recover    Reads keys from the file MANIP_.J1 as if they were
  81.         typed by the user.  This will restore you to the
  82.         point just before your pc crashed.
  83.         The last three journal files are stored (.j1 .j2 .j3)
  84.         simply copy the one you want to (.j1) to use it.
  85.  
  86.     -step    Used with recover,  press a space for each key you
  87.         want to read from the journal file,  press any other
  88.         key to stop reading the journal.
  89.  
  90.  
  91. 3 RANGE
  92.     Most manip commands accept a range as one or more of there
  93.     parameters.  A range is a rectangular section of your
  94.     spreadsheet.  A range can ether start with a 'c' or an
  95.     'r' and this will affect how the command operates.
  96.  
  97.     If your spreadsheet has 5 columns and 10 rows then.
  98.         c1 ==  c1c1r1r10  == 1,1  1,2  1,3  1,4  1,5  1,6 ...
  99.         r1 ==  r1r1c1c5   == 1,1  2,1  3,1  4,1  5,1
  100.         c1c2 ==c1c2r1r10  == 1,1  2,1  1,2  2,2  3,1  3,2 ...
  101.         r1r2c3=r1r2c3c5   == 3,1  3,2  4,1  4,2  5,1  5,2
  102.  
  103.  
  104. 3 ARROWS
  105.  The arrow keys normally move the data cursor, however if you are half
  106.  way thru typing a command then, the left and right arrow keys allow you
  107.  to edit the command.  Use the PAGE-UP and PAGE-DOWN keys to recall
  108.  your last command.
  109.  
  110.  SHIFT arrow keys will jump 7 cells at a time for fast movement.
  111.  
  112. 3 COPY
  113.  For copying a section to another section. "% COPY <range1> <range2> if <exp>"
  114.  They do not have to be the same shape. The pointers to both rangers
  115.  are increased even if the number is not coppied  e.g. 
  116.     "% COPY r4r2 r1r2"
  117.     "% COPY c1c3r6r100  c6c8 if c1<c2"
  118.  
  119.     "% COPY C1 C2 IF C1<4"
  120.     c1     c2
  121.     1       1
  122.     2       2
  123.     5       -
  124.     3       3
  125.     9       -
  126.  
  127.  
  128. 3 DELETE
  129.  For deleteing entire rows or columns.  "% DELETE <range> [IF <exp>]"
  130.  e.g.     "% DELETE c1c3 IF r1>3.and.r2=0
  131.     "% DELETE r1"
  132.  Numbers are shuffled in from the right to take the place of the
  133.  deleted range.
  134.  
  135. 3 DATA
  136.  Data entry mode is usefull for entering data.  After typing in
  137.  "% DATA c1c3" or "% DATA C2" you can then enter data and pressing
  138.  <cr> will move you to the next valid data position.
  139.  In this mode text or numbers can be entered.
  140.  Press ESC to get back to command mode.
  141.  
  142. 3 FIT
  143.   "FIT C3" will fit a least squares regression line to the data
  144.    in columns c3 and c4 (x values taken from c3) and print
  145.    out the results.
  146.  
  147. 3 EXIT 
  148.  EXIT saves the data in your input file spec and exits to DOS.  You
  149.  can optionally specify an output file as well. eg. "% EXIT myfile.dat
  150.  
  151.  The command "EXIT myfile.dat c3c5r1r3" will write out that range of
  152.  numbers to the file.
  153.  
  154.  By default manip will write columns seperated by spaces.
  155.  
  156.  The command "EXIT myfile.dat -TAB" will put a single tab between
  157.  each column of numbers and "EXIT myfile.dat -COMMA" will put a
  158.  comma and a space between each number.  (these two options are
  159.  usefull if your data file is very big and you don't want to waste
  160.  diskspace with the space characters.)  NOTE: The settings stay
  161.  in effect for future saves and exits.
  162.  
  163.  You can make it line up the columns on the decimal point by typing in the
  164.  command. "SET DPOINTS 3"
  165.  
  166.  You change the width of each column or completely remove the spaces
  167.  between columns with the command. "SET WIDTH 10"  (or set width 0)
  168.  
  169.  You can change the number of significant digits displayed with
  170.  the command "SET DIGITS 4"
  171.  
  172.  
  173. 3 SAVE
  174.  Saves all or part of your data.
  175.  "SAVE myfile.dat"
  176.  
  177.  The command "SAVE myfile.dat c3c5r1r3" will write out that range of
  178.  numbers to the file.
  179.  
  180.  By default manip will write columns seperated by spaces.
  181.  
  182.  The command "SAVE myfile.dat -TAB" will put a single tab between
  183.  each column of numbers and "SAVE myfile.dat -COMMA" will put a
  184.  comma and a space between each number.  (these two options are
  185.  usefull if your data file is very big and you don't want to waste
  186.  diskspace with the space characters)   NOTE: The settings stay
  187.  in effect for future saves and exits.
  188.  
  189.  You can make it line up the columns on the decimal point by typing in the
  190.  command. "SET DPOINTS 3"
  191.  
  192.  You change the width of each column or completely remove the spaces
  193.  between columns with the command. "SET WIDTH 10"  (or set width 0)
  194.  
  195.  You can change the number of significant digits displayed with
  196.  the command "SET DIGITS 4"
  197.  
  198. 3 GOTO
  199.  For moving the cursor directly to a point in your array.
  200.  e.g.     "% GOTO x y"
  201.  
  202. 3 CLEAR
  203.     "% CLEAR C2C3" Clears the given range of all values
  204.  
  205. 3 BLANK
  206.     "% BLANK C2C3" Clears the given range of all values
  207.  
  208. 3 NEW
  209.  Clears the spread sheet of all data and frees memory.
  210.  
  211. 3 INSERT
  212.  Inserts a new column or row and shifts all others over.
  213.  e.g.     "% INSERT c5" or "% INSERT r2".
  214.  
  215. 3 LOAD
  216.  Load data into columns. eg. "% LOAD filename" loads all data into corresponding
  217.  columns.  "% LOAD filename c3" load first column of data into c3 etc.
  218.  
  219.  "LOAD myfile.dat c3 -LIST"
  220.  This commmand will load the the data into a single column or range
  221.  (even if it is several columns wide in the data file)
  222.  
  223. 3 MOVE
  224.  For copying a section to another section. "% MOVE <range1> <range2> if <exp>"
  225.  They do not have to be the same shape. The pointer to the destination
  226.  is only increased if the line or column is coppied e.g.
  227.     "% MOVE c1 c2c3"
  228.     "% MOVE r4r2 r1r2"
  229.     "% MOVE c1c3r6r100  c6c8 if c1<c2"
  230.  
  231.     "% MOVE C1 C2 IF C1<4"
  232.     c1     c2
  233.     1       1
  234.     2       2
  235.     5       3
  236.     3       -
  237.     9       -
  238.  
  239.     (See COPY command)
  240.  
  241. 3 SORT 
  242.  Sort entire rows of the data based on the data in a particular column.
  243.  FORMAT: SORT <range> ON <exp>
  244.  e.g.    "% SORT c8 on c9"
  245.     "% SORT c1c8 on -c8"
  246.     "% SORT c1c3 on c2  "     !for sorting strings
  247.  
  248.  This command works out how to sort the column (or exp) specified
  249.  in the ON part of the command.  It then does that operation to
  250.  the range specified. e.g. "SORT C1 ON C1"  will sort column one.
  251.  
  252.  Use the additional qualifier -STRINGS if you want to sort a
  253.  column with strings in it. e.g. "sort c1 on c2 -strings"
  254.  
  255. 3 SWAP
  256.  Swap over two columns or rows.
  257.  e.g.     "% SWAP c1c2"
  258.     "% SWAP r3r1"
  259.  
  260. 3 SET
  261.           SET SIZE ncols nrows
  262.           SET BETWEEN " "
  263.           SET COLWIDTH
  264.           SET COLTYPE [n] DECIMAL | EXP | BOTH | DPOINTS n 
  265.           SET NCOL n
  266.           SET DPOINTS n
  267.           SET DIGITS n
  268.           SET WIDTH n
  269.  
  270. 4 WIDTH
  271.  Sets the width of padding to use for the columns when they
  272.  are written to a file.
  273.  The columns usually one space wider than this setting as
  274.  the BETWEEN string is usually set to one space by default.
  275.  
  276. 4 COLTYPE
  277.  This commands allows all or individual columns to be set to
  278.  different output types.  If colnumber is missing then that
  279.  setting is applied to all columns.
  280.  
  281.  SET COLTYPE Ccolnumber TYPE
  282.  
  283.  Where TYPE is one of:
  284.  
  285.     DECIMAL    produces     123.456
  286.     EXP       produces    1.23456e02
  287.     BOTH       produces whichever is more suitable
  288.     DPOINTS n  produces a fixed number of decimal places.
  289.  
  290.  e.g.
  291.     SET COLTYPE c2 DECIMAL
  292.     SET COLTYPE c1 EXP
  293.     SET COLTYPE c3 DPOINTS 4
  294.  
  295.  Would print out:
  296.     1.2e02       1.2    1.2000
  297.  
  298.     SET COLTYPE EXP   (column number missed out)
  299.  Would print out:
  300.     1.2e02    1.2e02  1.2e02
  301.  
  302. 4 COLWIDTH
  303.  Set the width of each column when displayed.
  304.  e.g.     "% SET COLWIDTH 12"
  305.  
  306. 4 NCOL
  307.  Set the number of columns to display.
  308.  e.g.     "% SET NCOL 3"
  309.  
  310. 4 SIZE
  311.   "SIZE 3 4" Truncates the spreadsheet to 3 columns and 4 rows.  This
  312.   also sets the values to use for default ranges.
  313.  
  314. 4 BETWEEN
  315.   "SET BETWEEN "##"
  316.   Defines the string to be printed between each column of numbers
  317.   when written to a file.  This is normally set to a single space.
  318.  
  319. 4 DPOINTS
  320.   Sets the number of decimal places to print.  This is used for
  321.   producing columns which line up on the decimal point.
  322.   e.g. with DPOINTS 3.
  323.     2.2   ->   2.200
  324.     234   -> 234.000
  325.  
  326.   (See also SET COLTYPE) 
  327.  
  328. 4 DIGITS
  329.     Sets the number of significat digits to be displayed, e.g.
  330.     with DIGITS 3.
  331.         123456    becomes   123000
  332.         0.12345   becomes   0.123
  333.  
  334. 3 LOGGING
  335.  For creating command files. e.g.
  336.     "% LOG sin.man"
  337.     "% c2=sin(c1)
  338.     "% c3=c2+2
  339.     "% close"
  340.  Then type in "@sin" to execute these commands.
  341.  
  342. 3 PROPAGATE
  343.  This command has the same format as move. e.g
  344.  "% PROPAGATE <source> <destination>"  The difference is that the
  345.  source is coppied as many times as possible to fill up the destination.
  346.  e.g.     "% PROP c1r1r7 c2"
  347.  
  348. 3 SUM
  349.  Adds up all the numbers in a range and displays the total and average.
  350.     "% SUM C1C3"
  351.  
  352. 3 PARSUM
  353.  Adds up one coloumn, putting the partial sum's into another coloumn.e.g.
  354.  1,2,3,4 becomes 1,3,6,10.
  355.     "% PARSUM C1 C4"
  356.  
  357. 3 GENERATE
  358.  For generating a patter of data e.g.   1 1 2 2 5 5 1 1 2 2 5 5 etc.
  359.     "% GEN 2(1,2,5)30 c4"    !1 1 2 2 5 5  repeated 30 times
  360.     "% GEN (1:100:5)5 c1"    !1 to 100 step 5,  5 times
  361.     "% GEN (1,2,*,3:5)5 c1"    !missing values included
  362.  
  363. 3 FUNCTIONS
  364.  Calculations can be performed on rows or columns. eg "% C1=C2*3+R"
  365.  where "R" stands for row-number and C1 and C2 are columns.
  366.  They can also be performed on ROWS. eg "% r1=sin(r2)+log10(c)"
  367.  
  368.  c1 = cell(c+1,r)+cell(c+2,r)
  369.  cell(1,3) = 33.3
  370.  
  371.  Valid operators and functions:       ,       +         -         ^
  372.  *         /        <=        >=       <>      <         >         =       )AND(
  373.  )OR(     +         -       ABS(     ATN(    COS(      EXP(      FIX(    INT(
  374.  LOG(     LOG10(   SGN(     SIN(     SQR(    TAN(      NOT(      RND(    SQRT( 
  375.  .NE.    .EQ.      .LT.     .GT.     .LE.    .GE.      .NOT.     .AND.   .OR. 
  376.  e.g. 3+4*COS(PI/180)^(3+1/30)+C1+R"
  377.  
  378. 3 QUIT
  379.  Abandon file.
  380.  
  381. 3 SHELL
  382.  Gives access to DOS.
  383.  
  384.